package com.huanying.goodjob.job;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

@Entity
@Table(name = "jobitemstatus_change")
public class Jobitemstatus_Change implements Serializable {

	private static final long serialVersionUID = -2811151674722292841L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;

	@ManyToOne(cascade = CascadeType.ALL, optional = false, fetch = FetchType.LAZY)
	@NotFound(action = NotFoundAction.IGNORE)
	@JoinColumn(name = "jobitem_id")
	private Jobitem jobitem; 
	
	private Date time; 
	
	@Column(name = "jobitem_status", nullable = false, columnDefinition = "INT default 0")
	private int jobitem_status; // 工作状态
	
	@Column(name = "status", nullable = false, columnDefinition = "INT default 1")
	private int status; // 状态

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Jobitem getJobitem() {
		return jobitem;
	}

	public void setJobitem(Jobitem jobitem) {
		this.jobitem = jobitem;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public int getJobitem_status() {
		return jobitem_status;
	}

	public void setJobitem_status(int jobitem_status) {
		this.jobitem_status = jobitem_status;
	}

}
